package problemSpace;

import java.util.Date;

import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;

@XmlRootElement(name = "Delivery")
public class Delivery {
	@XmlElement(name = "VehicleCode")
	public String vehicleCode;
	@XmlElement(name = "OrderCode")
	public String orderCode;
	@XmlElement(name = "DepartureStationCode")
	public String departureStationCode;
	@XmlElement(name = "ReturnStationCode")
	public String returnStationCode;
	@XmlElement(name = "LoadingTime")
	public Date loadingTime; // moment dat het laden start aan het laadstation
	@XmlElement(name = "UnloadingTime")
	public Date unloadingTime; // moment dat het lossen start op de constructionyard
	@XmlElement(name = "Volume")
	public double volume; // het geloste volume

	public Delivery() {}

	public Delivery(Delivery d) {
		vehicleCode = d.vehicleCode;
		orderCode = d.orderCode;
		departureStationCode = d.departureStationCode;
		returnStationCode = d.returnStationCode;
		loadingTime = d.loadingTime;
		unloadingTime = d.unloadingTime;
		volume = d.volume;
	}
	
	public String toString(){
		return ("Delivery for order " + orderCode 
				+ ", with vehicle " + vehicleCode 
				+ ", loading time " + loadingTime 
				+ ", unloading time " + unloadingTime 
				+ ", volume " + volume 
				+ ", station " + departureStationCode);
	}
}